package com.xiaoshuidi.cloud.framework.yinlian.core.trade;

import com.alibaba.excel.context.AnalysisContext;
import com.alibaba.excel.event.AnalysisEventListener;

public class DefaultYinlianExcelReadListener<T> extends AnalysisEventListener<T> {
    private YinlianExcelConsumer<T> consumer;

    public DefaultYinlianExcelReadListener(YinlianExcelConsumer<T> consumer) {
        this.consumer = consumer;
    }


    @Override
    public void invoke(T data, AnalysisContext context) {
        if (consumer != null) {
            consumer.accept(data);
        }
    }

    @Override
    public void doAfterAllAnalysed(AnalysisContext context) {

    }
}
